package com.peng.immodule.adapter;

/**
 * Created by Mr.Q on 2018/3/6.
 * 描述:
 *
 */

public class IMAConversation extends IMABase {

    public static final int IMAConversationType_CHAT = 0;
    public static final int IMAConversationType_GROUPCHAT = 1;
    public static final int IMAConversationType_CHATROOM = 2;
    public static final int IMAConversationType_DISCUSSIONGROUP = 3;
    public static final int IMAConversationType_HELPDESK = 4;

    public IMAConversation(IMAConversation var1) {
        this.nativeInit(var1);
    }

    public String conversationId() {
        return this.nativeConversationId();
    }

    public IMAConversation.IMAConversationType _getType() {
        int var1 = this.nativeConversationType();
        return var1 == 0?IMAConversation.IMAConversationType.CHAT:(var1 == 1?IMAConversation.IMAConversationType.GROUPCHAT:(var1 == 2?IMAConversation.IMAConversationType.CHATROOM:(var1 == 3?IMAConversation.IMAConversationType.DISCUSSIONGROUP:(var1 == 4?IMAConversation.IMAConversationType.HELPDESK:IMAConversation.IMAConversationType.CHAT))));
    }

    public boolean _removeMessage(String var1) {
        return this.nativeRemoveMessage(var1);
    }

    public boolean removeMessage(EMAMessage var1) {
        return this.nativeRemoveMessage(var1);
    }

    public boolean insertMessage(EMAMessage var1) {
        return this.nativeInsertMessage(var1);
    }

    public boolean appendMessage(EMAMessage var1) {
        return this.nativeInsertMessage(var1);
    }

    public boolean updateMessage(EMAMessage var1) {
        return this.nativeUpdateMessage(var1);
    }

    public boolean clearAllMessages() {
        return this.nativeClearAllMessages();
    }

    public boolean markMessageAsRead(String var1, boolean var2) {
        return this.nativeMarkMessageAsRead(var1, var2);
    }

    public boolean markAllMessagesAsRead(boolean var1) {
        return this.nativeMarkAllMessagesAsRead(var1);
    }

    public int unreadMessagesCount() {
        return this.nativeUnreadMessagesCount();
    }

    public int messagesCount() {
        return this.nativeMessagesCount();
    }

    public EMAMessage loadMessage(String var1) {
        return this.nativeLoadMessage(var1);
    }

    public EMAMessage latestMessage() {
        return this.nativeLatestMessage();
    }

    public EMAMessage latestMessageFromOthers() {
        return this.nativeLatestMessageFromOthers();
    }

    public List<EMAMessage> loadMoreMessages(String var1, int var2, IMAConversation.EMASearchDirection var3) {
        return this.nativeLoadMoreMessages(var1, var2, var3.ordinal());
    }

    public List<EMAMessage> searchMessages(long var1, int var3, IMAConversation.EMASearchDirection var4) {
        return this.nativeSearchMessages(var1, var3, var4.ordinal());
    }

    public List<EMAMessage> searchMessages(int var1, long var2, int var4, String var5, IMAConversation.EMASearchDirection var6) {
        return this.nativeSearchMessages(var1, var2, var4, var5, var6.ordinal());
    }

    public List<EMAMessage> searchMessages(String var1, long var2, int var4, String var5, IMAConversation.EMASearchDirection var6) {
        return this.nativeSearchMessages(var1, var2, var4, var5, var6.ordinal());
    }

    public List<EMAMessage> searchMessages(long var1, long var3, int var5) {
        return this.nativeSearchMessages(var1, var3, var5);
    }

    public String extField() {
        return this.nativeExtField();
    }

    public boolean _setExtField(String var1) {
        return this.nativeSetExtField(var1);
    }

    native String nativeConversationId();

    native int nativeConversationType();

    native boolean nativeRemoveMessage(String var1);

    native boolean nativeRemoveMessage(EMAMessage var1);

    native boolean nativeInsertMessage(EMAMessage var1);

    native boolean nativeAppendMessage(EMAMessage var1);

    native boolean nativeUpdateMessage(EMAMessage var1);

    native boolean nativeClearAllMessages();

    native void nativeClearCachedMessages();

    native boolean nativeMarkMessageAsRead(String var1, boolean var2);

    native boolean nativeMarkAllMessagesAsRead(boolean var1);

    native int nativeUnreadMessagesCount();

    native int nativeMessagesCount();

    native EMAMessage nativeLoadMessage(String var1);

    native EMAMessage nativeLatestMessage();

    native EMAMessage nativeLatestMessageFromOthers();

    native List<EMAMessage> nativeLoadMoreMessages(String var1, int var2, int var3);

    native List<EMAMessage> nativeSearchMessages(long var1, int var3, int var4);

    native List<EMAMessage> nativeSearchMessages(int var1, long var2, int var4, String var5, int var6);

    native List<EMAMessage> nativeSearchMessages(String var1, long var2, int var4, String var5, int var6);

    native List<EMAMessage> nativeSearchMessages(long var1, long var3, int var5);

    native String nativeExtField();

    native boolean nativeSetExtField(String var1);

    public IMAConversation() {
        this.nativeInit();
    }

    public void finalize() throws Throwable {
        this.nativeFinalize();
        super.finalize();
    }

    native void nativeInit();

    native void nativeInit(IMAConversation var1);

    native void nativeFinalize();

    public static enum EMASearchDirection {
        UP,
        DOWN;

        private EMASearchDirection() {
        }
    }

    public static enum IMAConversationType {
        CHAT,
        GROUPCHAT,
        CHATROOM,
        DISCUSSIONGROUP,
        HELPDESK;

        private IMAConversationType() {
        }
    }
}
